Jump To:
Technical Q&As
Carbon is a set of APIs that enables C and C++ developers to take advantage of Mac OS X-specific features, including an advanced user interface tool kit, an efficient event-handling mechanism, the Quartz 2D graphics library, and multiprocessing support. In addition, other industry-standard C and C++ APIs are easily available to Carbon developers, providing access to such services as the OpenGL drawing system, the Mach microkernel, and BSD operating-system services. Because Carbon is a collection of C programming interfaces, developers can use virtually any Macintosh C development environment that supports PowerPC to build Carbon applications.

Carbon Resources
A guided introduction and learning path for developers new to Carbon.   Essential information for developers using procedural C.   Descriptions of procedural C programming interface elements.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
Empty Memory Objects (HTML) ()
QA1259: Describes how two memory management edge cases are handled by the common Mac OS memory allocators.
Accessibility 2003-04-21
HID Manager Event Data Underruns (HTML)
QA1038: Explains how to correctly handle HID Manager event queue data underruns.
Apple Applications 2001-06-13
Calling an AppleScript and providing parameters from an Application (HTML) ()
QA1111: Explains calling and providing parameter values to an AppleScript event handler from an application written in C.
AppleScript 2002-03-13
Loading Scripting Additions without initializing AppleScript in Mac OS X (HTML)
QA1070: Explains how to load scripting additions so you can call them using Apple events.
AppleScript 2001-09-13
Retrieving Data from AEDesc Records - do not use the dataHandle field (HTML) ()
QA1139: Describes the correct way to access data stored in AEDesc records.
AppleScript 2002-04-10
Dynamically registering a bundled component (HTML)
QA1083: Describes how to dynamically register a Component which resides in an Application bundle.
Core Foundation 2004-06-07
Internet Connect Speed (HTML) ()
QA1165: Describes how to get the modem connection speed from the System Configuration framework dynamic store.
Core Foundation 2003-03-26
BowelsOfTheMemoryManager (aka YourHeapIsProbablyCorrupt) (HTML) ()
Deprecated - ME05: What the symbol BowelsoftheMemoryManager means and the most probable cause of this symbol in MacsBug.
Data Management 2001-02-01
CFXML to CFPropertyListRef (and back!) (HTML) ()
QA1208: Describes to how save and restore a CFPropertyListRef to and from an XML file.
Data Management 2003-08-29
Ejecting the Volume on Which Your Program Resides (HTML) ()
FL09: Suggests different solutions regarding ejecting a disk on which an application resides.
Data Management 1998-07-06
Empty Memory Objects (HTML) ()
QA1259: Describes how two memory management edge cases are handled by the common Mac OS memory allocators.
Data Management 2003-04-21
Non Mac OS X Bundled data-fork based Resources (HTML) ()
QA1098: Mac OS X Bundled data-fork based Resources
Data Management 2003-08-20
Securely Erasing, Accessing and Dismounting a Macintosh Partition (HTML) ()
FL11: Set up a disk for secure erasures. Resources with information on magnetic disks, information recovery.
Data Management 1999-01-11
Setting environment variables for user processes (HTML)
QA1067: Tells how to set environment variables for user processes.
Data Management 2001-10-25
Adding an automated Window menu to your application (HTML)
QA1080: Explains how to add an automated Window menu to your Carbon application.
Design Guidelines 2001-10-30
Are there any OSStatus values I can use in my programs? (HTML)
OV02: Describes OSStatus values that generate errors without colliding with reserved Apple system values.
Design Guidelines 1999-11-22
Detecting specific ROM-in-RAM Mac (HTML) ()
Deprecated - HW49: Identifying a Mac by name ("iMac"), and better alternatives for determining specific features ("has Firewire").
Design Guidelines 1999-10-05
Ejecting the Volume on Which Your Program Resides (HTML) ()
FL09: Suggests different solutions regarding ejecting a disk on which an application resides.
Design Guidelines 1998-07-06
Enabling the application menu's "Preferences..." menu item on Mac OS X (HTML)
QA1079: Explains how to enable the application menu's "Preferences..." menu item on Mac OS X.
Design Guidelines 2001-10-30
Is QuickTime thread-safe? (HTML)
QA1088: Discusses thread-safety and reentrancy of the QuickTime library on both Mac & Windows.
Design Guidelines 2001-11-01
Non Mac OS X Bundled data-fork based Resources (HTML) ()
QA1098: Mac OS X Bundled data-fork based Resources
Design Guidelines 2003-08-20
OTScheduleDeferredTask When Task Running (HTML) ()
NW52: Describes what happens when you use OTScheduleDefferedTask to schedule a task that is running.
Design Guidelines 1997-10-13
QuickTime and Carbon Events (HTML)
QA1090: Discusses how to ensure smooth movie playback when using Carbon Events in an application.
Design Guidelines 2001-10-26
Securely Erasing, Accessing and Dismounting a Macintosh Partition (HTML) ()
FL11: Set up a disk for secure erasures. Resources with information on magnetic disks, information recovery.
Design Guidelines 1999-01-11
OTScheduleDeferredTask When Task Running (HTML) ()
NW52: Describes what happens when you use OTScheduleDefferedTask to schedule a task that is running.
Events & Other Input 1997-10-13
Power Management; Policy Maker vs. Power Controller (HTML) ()
QA1121: Describes the differences between a Power Management Policy Maker and a Power Management Power Controller.
Events & Other Input 2002-02-13
Process Carbon Events Not Delivered in 10.2 (HTML) ()
QA1181: Work around for a bug in Mac OS X 10.2 that prevents the delivery of process Carbon events.
Events & Other Input 2002-08-27
Programmatically causing restart, shutdown and/or logout (HTML) ()
QA1134: Describes how to programmatically cause restart, shutdown, sleep or logout.
Events & Other Input 2003-02-10
QDFlushPortBuffer (HTML) ()
QD65: Describes a possible solution for window update problems under Carbon.
Events & Other Input 2000-11-08
SetFontInfoForSelection incorrect prototype (HTML)
QA1375: Describes the incorrect prototyping of the SetFontInfoForSelection API and gives a workaround.
Events & Other Input 2004-10-04
WaitMouseUp documentation errata (HTML)
QA1008: Specifies the correct behavior of the WaitMouseUp function.
Events & Other Input 2001-02-27
The "/.vol" directory and "volfs" (HTML) ()
QA1113: Describes how the Carbon File Manager interacts with BSD via "volfs" and the "/.vol" directory.
File Management 2002-02-14
Accessing File Control Blocks (HTML) ()
FL10: Shows how to access file control blocks correctly, reiterating not to access FCBs directly.
File Management 1999-10-05
Allocate and Disk Full Error (HTML) ()
FL12: Discusses a problem with AFP volumes displaying incorrect free space, and returning disk full errors.
File Management 1999-07-21
Avoiding the -42 error with DiscRecording (HTML)
QA1292: Explains how to workaround the -42 error when using the DiscRecording API.
File Management 2004-05-25
Determining if a Drive is a Network Volume (HTML) ()
NW09: Shows how to determine if a volume is mounted over the network.
File Management 1998-06-01
Determining volume size (HTML) ()
FL08: Describes methods of determining volume size and free space under Mac OS.
File Management 1998-09-14
Developing for VFS (HTML) ()
QA1242: Describes Apple's position on developing external file systems (VFS plug-ins) for Mac OS X.
File Management 2003-03-26
Directories Appear as Volume Aliases (HTML)
QA1351: Discusses how VFS plug-ins should handle device numbers to ensure compatibility with Carbon applications.
File Management 2004-05-25
Disconnected aliases on CD-ROM and Alias Manager (HTML)
OPS05: Explains why aliases may become disconnected on a CD-ROM.
File Management 2001-03-26
Ejecting the Volume on Which Your Program Resides (HTML) ()
FL09: Suggests different solutions regarding ejecting a disk on which an application resides.
File Management 1998-07-06
Enabling the Navigation Services default behavior in its dialogs (HTML)
QA1384: Explains how to enable the default behavior of the Navigation Services dialogs.
File Management 2004-10-15
File Manager Text Encoding Hints (HTML) ()
QA1223: How to use Text Encoding Hints.
File Management 2003-01-20
Finding your application's directory (HTML)
FL14: Demonstrates finding your application's directory and setting it as the default directory.
File Management 2000-06-19
FSSetCatalogInfo versus UID and GID (HTML) ()
QA1251: Describes why FSSetCatalogInfo does not set the UID and GID of the file, and provides a work around.
File Management 2003-03-26
How can I set the default location with the modern Navigation APIs NavCreatexxx? (HTML) ()
QA1151: Explains how to set the default location with a NavCustomControl call using the kNavCtlSetLocation message in the Event Proc.
File Management 2002-07-01
Locking an Area Using PBLockRange (HTML) ()
OPS09: Describes the behavior of PBLockRange.
File Management 1996-05-14
My custom item dismisses my Navigation Services dialog (HTML)
QA1381: Gives a workaround for dismissive clicks on items in the custom area of Navigation Services dialogs.
File Management 2004-11-22
Non Mac OS X Bundled data-fork based Resources (HTML) ()
QA1098: Mac OS X Bundled data-fork based Resources
File Management 2003-08-20
Notifying the Finder of changed or newly created files (HTML) ()
QA1260: Recommended approach to notifying the Finder to update its open windows of a file creation or change.
File Management 2003-04-15
PBLockRange with a zero-length range (HTML)
FL13: Describes the afpRangeOverlap error and a work around.
File Management 1999-11-22
Securely Erasing, Accessing and Dismounting a Macintosh Partition (HTML) ()
FL11: Set up a disk for secure erasures. Resources with information on magnetic disks, information recovery.
File Management 1999-01-11
Sorting Like the Finder (HTML)
QA1159: Shows how to sort strings like the Finder's list view.
File Management 2004-10-27
Text Encodings in VFS (HTML) ()
QA1173: How to handle text encodings correctly when writing a file system (VFS) plug-in for Mac OS X.
File Management 2003-02-10
Third party VFS can't unmount on Mac OS X 10.3 (HTML)
QA1308: Describes changes in unmounting behavior for VFS plug-ins under Mac OS X 10.3 "Panther."
File Management 2003-10-23
Carbon Full Screen Conundrums (HTML)
QA1068: Describes the available Mac OS X DrawSprocket services.
Games 2001-08-20
CGBitmapContextCreate Supported Color Spaces (HTML)
QA1037: Lists the color space and alpha info combinations currently supported by CGBitmapContextCreate.
Games 2004-09-09
Context Sharing Tips (HTML) ()
QA1248: How to correctly share OpenGL contexts and what the limits on this sharing are.
Games 2003-06-24
Correct Setup of an AGLDrawable (HTML)
OGL02: Describes the setup of an AGLDrawable.
Games 2000-10-04
Current GDevice Dependencies (HTML) ()
QA1115: Describes potential problems with creating windows or ports when the current GDevice isn't the main device.
Games 2002-02-13
Finding Missing OpenGL CFM Entry Points (HTML) ()
QA1225: A resolution to Mac OS X 10.2 OpenGL CFM applications which break under Mac OS X 10.1.
Games 2002-12-23
GetProcAdress and OpenGL Entry Points (HTML) ()
QA1188: Technique for finding function pointers for OpenGL entry points in Cocoa and Carbon
Games 2002-11-25
How can I programmatically determine the DPI of the current video mode? (HTML) ()
QA1217: Describes how to compute the DPI for a given display in a given mode using Core Graphics.
Games 2002-12-02
How do I tell if a particular display is being hardware accelerated by Quartz Extreme? (HTML) ()
QA1218: Describes how to use CGDisplayUsesOpenGLAcceleration to see if a display is accelerated or not.
Games 2002-12-04
How do I use QuickDraw with CGDirectDisplay? (HTML)
QA1011: Explains how to draw to a CGDirectDisplay-captured display using QuickDraw.
Games 2001-04-11
Incorrect Inside Macintosh Volume V documentation (HTML)
Deprecated - QD15: Identifies incorrect documentation in Inside Macintosh Volume V regarding the formats of PnPixPat and BkPixPat opcodes.
Games 1995-09-15
OpenGL Sample Code (HTML)
QA1166: Describes new naming convention for OpenGL sample code
Games 2004-12-01
OpenGL Texture Sharing Between Contexts (HTML)
QA1031: Describes the process of creating shared OpenGL contexts and sharing textures between these contexts.
Games 2001-05-01
Setting environment variables for user processes (HTML)
QA1067: Tells how to set environment variables for user processes.
Games 2001-10-25
Updating OpenGL Contexts (HTML) ()
QA1209: When and why to update an OpenGL context in response to system and user actions.
Games 2003-06-19
Using Clip Region and Buffer Rectangles with OpenGL Carbon (HTML) ()
QA1222: Shows the basics of using buffer rectangles and clip regions with AGL.
Games 2002-12-19
Using Temporary Memory with OpenPicture (HTML)
Deprecated - QD20: Provides several techniques of causing OpenPicture to allocate temporary memory for a picture handle.
Games 1996-02-01
aglChoosePixelFormat, The Inside Scoop (HTML)
OGL01: Describes the nuances of aglChoosePixelFormat, including specific information on multi-monitor support.
Graphics & Imaging 2000-04-03
CalcCMask and SeedCFill in Carbon (HTML) ()
QD62: Explains how to use CalcCMask and SeedCFill in Carbon even though Carbon doesn't support OpenPort.
Graphics & Imaging 2000-11-08
CGBitmapContextCreate Supported Color Spaces (HTML)
QA1037: Lists the color space and alpha info combinations currently supported by CGBitmapContextCreate.
Graphics & Imaging 2004-09-09
CGContext Bounds (HTML)
QA1048: Explains how to determine the bounds of a CGContext.
Graphics & Imaging 2001-07-02
CGContextAddLineToPoint, CGContextAddCurveToPoint, et. al. (HTML)
QA1049: Explains why the CGContextAddXYZ APIs don't draw anything immediately.
Graphics & Imaging 2001-07-02
CGContextClosePath (HTML)
QA1046: Explains when you should call CGContextClosePath.
Graphics & Imaging 2001-10-02
CGImageRef contents are immutable (HTML) ()
QA1276: Explains that CGImageRef contents are considered immutable once created.
Graphics & Imaging 2003-07-17
Context Sharing Tips (HTML) ()
QA1248: How to correctly share OpenGL contexts and what the limits on this sharing are.
Graphics & Imaging 2003-06-24
Converting RGB Colors to a Palette Index (HTML)
Deprecated - QD21: Explains how to convert RGB colors into the palette index created by an application.
Graphics & Imaging 1995-09-15
Correct Setup of an AGLDrawable (HTML)
OGL02: Describes the setup of an AGLDrawable.
Graphics & Imaging 2000-10-04
Creating Gray Scaled Images > 8 bits (HTML) ()
Deprecated - QD51: Shows how to create gray-scaled images at resolutions greater than 8 bits for display.
Graphics & Imaging 1997-11-17
Current GDevice Dependencies (HTML) ()
QA1115: Describes potential problems with creating windows or ports when the current GDevice isn't the main device.
Graphics & Imaging 2002-02-13
Debugging Graphics with QuartzDebug (HTML) ()
QA1236: Explains how to use QuartzDebug to debug graphics issues.
Graphics & Imaging 2003-02-25
DeviceLoop is for drawing (HTML)
QA1024: Warns of one common misuse of the DeviceLoop API and gives two alternative solutions.
Graphics & Imaging 2001-04-11
Drawing a Path Multiple Times (HTML)
QA1047: Explains that path drawing operations consume the path.
Graphics & Imaging 2001-07-02
Error -151 and NewGWorld (HTML)
Deprecated - QD18: Explains what the error code -151 means when in NewGWorld.
Graphics & Imaging 1995-09-15
Finding Missing OpenGL CFM Entry Points (HTML) ()
QA1225: A resolution to Mac OS X 10.2 OpenGL CFM applications which break under Mac OS X 10.1.
Graphics & Imaging 2002-12-23
GetPortBitMapForCopyBits (HTML) ()
Deprecated - QD61: Describes the proper usage of GetPortBitMapForCopyBits.
Graphics & Imaging 2000-11-08
GetProcAdress and OpenGL Entry Points (HTML) ()
QA1188: Technique for finding function pointers for OpenGL entry points in Cocoa and Carbon
Graphics & Imaging 2002-11-25
grayishTextOr and Mac OS 8.5 (HTML) ()
Deprecated - QD59: Explains why text drawn using TextMode(grayishTextOr) is never drawn; provides a workaround.
Graphics & Imaging 1998-12-07
How can I programmatically determine the DPI of the current video mode? (HTML) ()
QA1217: Describes how to compute the DPI for a given display in a given mode using Core Graphics.
Graphics & Imaging 2002-12-02
How do I tell if a particular display is being hardware accelerated by Quartz Extreme? (HTML) ()
QA1218: Describes how to use CGDisplayUsesOpenGLAcceleration to see if a display is accelerated or not.
Graphics & Imaging 2002-12-04
How do I use PMSessionGetGraphicsContext to get a CGContextRef? (HTML) ()
QA1216: Describes how to use PMSessionSetDocumentFormatGeneration and PMSessionGetGraphicsContext to get a CGContextRef for printing.
Graphics & Imaging 2003-02-25
How do I use QuickDraw with CGDirectDisplay? (HTML)
QA1011: Explains how to draw to a CGDirectDisplay-captured display using QuickDraw.
Graphics & Imaging 2001-04-11
How to measure CG text (HTML)
QA1051: Explains how to measure Core Graphics text.
Graphics & Imaging 2001-07-02
Improving ATSUI Text Drawing Performance (HTML)
QA1027: Talks about one way of improving ATSUI text drawing performance.
Graphics & Imaging 2001-04-17
Incorrect Inside Macintosh Volume V documentation (HTML)
Deprecated - QD15: Identifies incorrect documentation in Inside Macintosh Volume V regarding the formats of PnPixPat and BkPixPat opcodes.
Graphics & Imaging 1995-09-15
Is ColorSync thread safe? (HTML) ()
QA1261: Discusses ColorSync thread-safety issues.
Graphics & Imaging 2003-04-17